//package org.hard.config;
//
//import org.springframework.boot.web.servlet.FilterRegistrationBean;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.core.Ordered;
//
///**
// * @Author: renzhebiao
// * @Date 2020/2/25 16:09
// * @Versioin 1.0
// */
//@Configuration
//public class WebConfig {
//
//    @Bean
//    public FilterRegistrationBean corsFilter() {
//        FilterRegistrationBean registration = new FilterRegistrationBean();
//        // 注入过滤器
//        registration.setFilter(new CorsFilter());
//        // 拦截规则
//        registration.addUrlPatterns("/*");
//        // 过滤器名称
//        registration.setName("CorsFilter");
//        // 过滤器顺序
//        registration.setOrder(Ordered.HIGHEST_PRECEDENCE);
//        return registration;
//    }
//
////    @Bean // 暂时不知道做什么
////    public HttpMessageConverters jacksonJsonHttpMessageConverters() {
////        MappingJackson2HttpMessageConverter jsonConverter = new EventLogJackson2HttpMessageConverter();
////        jsonConverter.setObjectMapper(Jsons.getObjectMapper());
////        HttpMessageConverter<?> converter = jsonConverter;
////        return new HttpMessageConverters(converter);
////    }
//}
